import request from '@/utils/request'
import type { Question, PracticeSubmission } from '@/types/question_category/practice'

// 获取随机问题列表
export function getRandomQuestions(categoryNo: string, limit: number) {
  return request.getWithParams('/api/question/limitList', 
    {
      categoryNo,
      limit
    }
  )
}

// 提交练习结果
export function submitPractices(data: PracticeSubmission) {
  return request.post('/api/practice/submit', data)
}